package com.adtech.adms.system.dao;

import java.util.List;

import com.adtech.adms.system.pojo.Feature;
import com.adtech.adms.system.pojo.Role;
import com.adtech.core.dao.HibernateDAO;

/**
 * 功能模块DAO
 * 定义功能模块数据库操作接口
 * @author Dormin J
 * @since 2011-8-11 
 * 
 * @Copyright (C) AD Tech Workshop All Right Reserved
 */
public interface FeatureDAO extends HibernateDAO {
	public List<Feature> getFeaturesByUserId(long id,String filter);
	public List<Feature> getFeaturesByRoles(List<Role> roles);
	public List<Feature> getFeaturesNotRole(Role role);
	
	/**
	 * 根据根节点主键查找所有子孙节点
	 * @param rootId
	 * @return 子孙节点列表
	 * @author Dormin
	 */
	public List<Feature> getSubFeatureList(Long rootId);
	
	/**
	 * 判断当前权限是否半选
	 * @param feature
	 * @param user
	 * @return
	 * @author Dormin
	 */
	public boolean isHalfChecked(Feature feature,Role role);

}
